﻿<%@ Page Title="" Language="C#" MasterPageFile="~/UserMaster.Master" AutoEventWireup="true" CodeBehind="changepwd.aspx.cs" Inherits="QunYing.Web.market.changepwd" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">
    
    function verify() {
        var oldPwd = $.trim($("#<%=this.txtOldPwd.ClientID %>").val());
        var newPwd1 = $.trim($("#<%=this.txtNewPwd1.ClientID%>").val());
        var newPwd2 = $.trim($("#<%=this.txtNewPwd2.ClientID%>").val());

            if (oldPwd.length == 0) {
                alert("请输入旧密码!");
                $("#<%=this.txtOldPwd.ClientID %>").focus();
                return false;
            }
            if (newPwd1.length == 0) {
                alert("请输入新密码!");
                $("#<%=this.txtNewPwd1.ClientID%>").focus();
                return false;
            }
            if (newPwd2.length == 0) {
                alert("请确认新密码!");
                $("#<%=this.txtNewPwd2.ClientID%>").focus();
                return false;
            }
            if (newPwd1 != newPwd2) {
                alert("两次密码输入不一致!");
                $("#<%=this.txtNewPwd1.ClientID%>").val("");
                $("#<%=this.txtNewPwd2.ClientID%>").val("");
                $("#<%=this.txtNewPwd1.ClientID%>").focus();
                return false;
            }
            return true;
        }
        function cleartxt() {
                   $("#<%=this.txtOldPwd.ClientID %>").val("");
                    $("#<%=this.txtNewPwd1.ClientID%>").val("");
                    $("#<%=this.txtNewPwd2.ClientID%>").val("");
                    $("#<%=this.txtOldPwd.ClientID %>").focus();
            return false;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="main">
      
      <div class="index_box">
        <h2><span><strong>修改</strong>密码</span></h2>
        <table style="width: 400px;margin:10px;">
            <tr>
                <td>
                    旧&nbsp;&nbsp;密&nbsp;码:
                </td>
                <td>
                    <asp:TextBox ID="txtOldPwd" runat="server" TextMode="Password" MaxLength="20" 
                        ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    新&nbsp;&nbsp;密&nbsp;码:
                </td>
                <td>
                    <asp:TextBox ID="txtNewPwd1" runat="server" TextMode="Password" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    确认密码:
                </td>
                <td>
                    <asp:TextBox ID="txtNewPwd2" runat="server" TextMode="Password" MaxLength="20"></asp:TextBox>
                </td>
            </tr>
            <tr><td></td><td></td></tr>
            <tr>
                <td>
                    &nbsp;
                </td>
                <td>
                    <asp:Button ID="btnSubmit" runat="server" Text="修改" 
                        OnClientClick="return verify();" onclick="btnSubmit_Click"/>&nbsp;
                    <asp:Button ID="btnClose" runat="server" Text="清空" OnClientClick="return cleartxt();" />
                </td>
            </tr>
        </table>
    </div></div>
</asp:Content>
